package com.sky.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddCategoryDTO {
    @NotNull(message = "菜品名称不能为空")
    @Size(min = 1,max = 20,message = "菜品名称过长")
    private String name;
    @Min(0)
    private Integer sort;
    @Min(0)
    //@Max(1)
    private Integer type;
}
